import request from '@/utils/request'

export const getUsersAPI = (data) => {
  return request.get('/users', {
    params: data
  })
}

export const editUsers = (data, id) => {
  return request.put('/users/' + id, data)
}

export const delUsers = id => {
  return request.delete('/users/' + id)
}

export const addUsersAPI = data => {
  return request.post('/users', data)
}

export const PutApi = (id, bool) => {
  return request.put(`/users/${id}/state/${bool}`)
}